fix memory leak in kml reader.
authortsteven4 <tsteven4@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Sun, 4 Aug 2013 20:11:02 +0000 (20:11 +0000)
committertsteven4 <tsteven4@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Sun, 4 Aug 2013 20:11:02 +0000 (20:11 +0000)
gpsbabel/kml.cc

index 91fa64564a419ef383567ab97e00bd857bbb6cb5..4dd82afd07d14eaa93efe517b2c3e44df073415e 100644 (file)
@@ -292,6 +292,8 @@ void wpt_e(const char* args, const char** unused)
 {
   if (wpt_tmp_queued) {
     waypt_add(wpt_tmp);
+  } else {
+       waypt_free(wpt_tmp);
   }
   wpt_tmp_queued = 0;
 }